![]() |
YNQ
YNQ-1.5.0
|
Macros | |
| #define | SY_EXTENDFILENOTSUPPORTED |
| #define | SY_PATHSEPARATOR '/' |
| #define | SYFile int |
| #define | syInvalidateFile(_f) *_f = ERROR |
| #define | syIsValidFile(_file) (_file!=ERROR) |
| #define | syInvalidFile() (ERROR) |
| #define | SY_CP_FIRSTILLEGALCHAR {0xe5} |
| #define | SY_CP_ANYILLEGALCHAR {0x7c, 0x5c} |
| #define | syFlushFile(_file) ((fsync(_file)==OK)? NQ_SUCCESS:NQ_FAIL) |
| #define | syGetSecurityDescriptor(_f, _i, _b) udGetSecurityDescriptor(_f, _i, _b) |
| #define | sySetSecurityDescriptor(_f, _i, _b, _l) udSetSecurityDescriptor(_f, _i, _b, _l) |
| #define SY_EXTENDFILENOTSUPPORTED |
On some platforms ftruncate() might not support extending file. In this case open this define to simulate extending files
| #define SY_PATHSEPARATOR '/' |
Path separator character
| #define SYFile int |
File handle
| #define syInvalidateFile | ( | _f | ) | *_f = ERROR |
Set invalid file handle
| #define syIsValidFile | ( | _file | ) | (_file!=ERROR) |
Check file handle
| #define syInvalidFile | ( | ) | (ERROR) |
| #define SY_CP_FIRSTILLEGALCHAR {0xe5} |
Characters which are not acceptable by the file system as a file name
| #define SY_CP_ANYILLEGALCHAR {0x7c, 0x5c} |
Characters which are not acceptable by the file system as a file name
| #define syFlushFile | ( | _file | ) | ((fsync(_file)==OK)? NQ_SUCCESS:NQ_FAIL) |
| #define syGetSecurityDescriptor | ( | _f, | |
| _i, | |||
| _b | |||
| ) | udGetSecurityDescriptor(_f, _i, _b) |
This function is actually user-defined. These macros are used for properly redefining file descriptors
| #define sySetSecurityDescriptor | ( | _f, | |
| _i, | |||
| _b, | |||
| _l | |||
| ) | udSetSecurityDescriptor(_f, _i, _b, _l) |
This function is actually user-defined. These macros are used for properly redefining file descriptors
| SYFile syCreateFile | ( | const NQ_WCHAR * | name, |
| NQ_BOOL | denyread, | ||
| NQ_BOOL | denyexecute, | ||
| NQ_BOOL | denywrite | ||
| ) |
Create and open new file
| name | File name |
| denyread | True - to deny sharing for read |
| denyexecute | True - to deny sharing for execute |
| denywrite | True - to deny sharing for write |
Delete file
| name | File name |
Rename file
| oldName | File name |
| newName | New file name |
| SYFile syOpenFileForRead | ( | const NQ_WCHAR * | name, |
| NQ_BOOL | denyread, | ||
| NQ_BOOL | denyexecute, | ||
| NQ_BOOL | denywrite | ||
| ) |
Open file for reading
| name | File name |
| denyread | True - to deny sharing for read |
| denyexecute | True - to deny sharing for execute |
| denywrite | True - to deny sharing for write |
| SYFile syOpenFileForWrite | ( | const NQ_WCHAR * | name, |
| NQ_BOOL | denyread, | ||
| NQ_BOOL | denyexecute, | ||
| NQ_BOOL | denywrite | ||
| ) |
Open file for writing
| name | File name |
| denyread | True - to deny sharing for read |
| denyexecute | True - to deny sharing for execute |
| denywrite | True - to deny sharing for write |
| SYFile syOpenFileForReadWrite | ( | const NQ_WCHAR * | name, |
| NQ_BOOL | denyread, | ||
| NQ_BOOL | denyexecute, | ||
| NQ_BOOL | denywrite | ||
| ) |
Open file for reading and writing
| name | File name |
| denyread | True - to deny sharing for read |
| denyexecute | True - to deny sharing for execute |
| denywrite | True - to deny sharing for write |
Truncate file
| file | File handle |
| offLow | Offset low |
| offHigh | Offset high |
Read bytes from file
| file | File handle |
| buf | Buffer for data |
| len | Number of bytes to read |
Write bytes into file
| file | File handle |
| buf | Bytes to write |
| len | Number of bytes to write |
Close opened file
| fd | Handle of the file |
Position file relatively from the current position
| file | File handle |
| off | Low 32 bits of the offset |
| offHigh | High 32 bits of the offset |
Position file from the beginning
| file | File handle |
| off | Low 32 bits of the offset |
| offHigh | High 32 bits of the offset |
Position file from the end
| file | File handle |
| off | Low 32 bits of the offset |
| offHigh | High 32 bits of the offset |
| NQ_STATUS syGetFileInformation | ( | SYFile | file, |
| const NQ_WCHAR * | fileName, | ||
| SYFileInformation * | fileInfo | ||
| ) |
Read file information structure by file handle
| file | File id |
| fileName | File name |
| fileInfo | File information structure |
| NQ_STATUS syGetFileInformationByName | ( | const NQ_WCHAR * | fileName, |
| SYFileInformation * | fileInfo | ||
| ) |
Read file information structure by file name
| fileName | File name |
| fileInfo | File information structure |
Read file size by file handle
| file | File id |
| size | File size |
| NQ_STATUS sySetFileInformation | ( | const NQ_WCHAR * | fileName, |
| SYFile | handle, | ||
| const SYFileInformation * | fileInfo | ||
| ) |
Update file information by either file name or file handle
| fileName | File name |
| handle | File handle |
| fileInfo | File information structure |
| NQ_STATUS syGetVolumeInformation | ( | const NQ_WCHAR * | name, |
| SYVolumeInformation * | info | ||
| ) |
Query volume information
| name | Volume name |
| info | Buffer for information |